package cn.tedu.stx_admin.security;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 自定义UserDetails类，根据用户登录提供的用户名查询数据库信息
 */
public class CustomUserDetails extends User {
    private Long id;
    private String imgUrl;

    public CustomUserDetails(String adminName, String password, Collection<? extends GrantedAuthority> authorities, Long id, String imgUrl) {
        super(adminName, password, authorities);
        this.id = id;
        this.imgUrl = imgUrl;
    }
}
